// Copyright (c) 2020 Presto Labs Pte. Ltd.
// Author: jshin

#pragma once

#include <algorithm>
#include <cstdint>
#include <map>
#include <memory>
#include <string>

#include "naviasync/ipc/topic_record_packet.h"

namespace coin2::exchange::base::executor {

using TopicRecordPacket = naviasync::ipc::TopicRecordPacket;

class TopicRecordSubscriber {
 public:
  virtual void OnTopicRecordBase(const TopicRecordPacket& packet) {
    OnTopicRecord(packet);
  }
  virtual void OnTopicRecord(const TopicRecordPacket& packet) = 0;
  virtual ~TopicRecordSubscriber() = default;
};

class SharedTopicRecordSubscriber {
 public:
  virtual void OnTopicRecord(std::shared_ptr<TopicRecordPacket> packet) = 0;
  virtual ~SharedTopicRecordSubscriber() = default;
};

}  // namespace coin2::exchange::base::executor
